package Demo3;

import java.io.File;
import java.io.IOException;
import java.nio.Buffer;

public class IOInterface extends Thread {
    private char name;// 名字
    private int src;// 开头
    private int dest;// 结尾s
    public IOInterface(char name, int src,int dest) {
        this.name = name;
        this.src = src;
        this.dest = dest;
    }
    @Override
    public void run() {
            File file1 = new File("D:\\text\\" + name);
            file1.mkdir();
        for(int i = src; i <= dest;i++) {
            String str = "D:\\text\\" + name + "\\" + name + i + ".txt";
            File file2 = new File(str);
            try {
                file2.createNewFile();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
